<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>Hello world1111</h1>
<div id ="empData"></div>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script>
       //发送ajax请求  请求http://localhost:8080/emp
       axios.get('http://localhost:8080/emp')
            .then(res=>{
                console.log(res);
                let jsonStr = JSON.stringify(res.data);
                document.getElementById("empData").innerHTML = jsonStr;
            })

   </script>
</body>
</html>